package icu.hsu.apisdk.service;

import icu.hsu.apisdk.client.HsuApiClient;
import icu.hsu.apisdk.exception.ApiException;
import icu.hsu.apisdk.model.request.*;
import icu.hsu.apisdk.model.response.LoveResponse;
import icu.hsu.apisdk.model.response.PoisonousChickenSoupResponse;
import icu.hsu.apisdk.model.response.RandomWallpaperResponse;
import icu.hsu.apisdk.model.response.ResultResponse;

/**
 * 定义API服务接口，声明各种API调用方法
 * @ClassName: ApiService
 * @author Hsu琛君珩
 * @date 2024-09-08
 * @apiNote
 * @Version: v1.0
 */
public interface ApiService {

    // 通用API请求方法
    <O, T extends ResultResponse> T request(BaseRequest<O, T> request) throws ApiException;

    // 带客户端信息的通用API请求方法
    <O, T extends ResultResponse> T request(HsuApiClient hsuApiClient, BaseRequest<O, T> request) throws ApiException;

    // 获取随机毒鸡汤，无需客户端信息
    PoisonousChickenSoupResponse getPoisonousChickenSoup() throws ApiException;

    // 获取随机毒鸡汤，带客户端信息
    PoisonousChickenSoupResponse getPoisonousChickenSoup(HsuApiClient hsuApiClient) throws ApiException;

    // 获取随机壁纸
    RandomWallpaperResponse getRandomWallpaper(RandomWallpaperRequest request) throws ApiException;

    // 获取随机壁纸，带客户端信息
    RandomWallpaperResponse getRandomWallpaper(HsuApiClient hsuApiClient, RandomWallpaperRequest request) throws ApiException;

    // 获取随机情话
    LoveResponse randomLoveTalk() throws ApiException;

    // 获取随机情话，带客户端信息
    LoveResponse randomLoveTalk(HsuApiClient hsuApiClient) throws ApiException;

    // 获取星座运势
    ResultResponse horoscope(HoroscopeRequest request) throws ApiException;

    // 获取星座运势，带客户端信息
    ResultResponse horoscope(HsuApiClient hsuApiClient, HoroscopeRequest request) throws ApiException;

    // 获取IP信息
    ResultResponse getIpInfo(HsuApiClient hsuApiClient, IpInfoRequest request) throws ApiException;

    // 获取IP信息，无需客户端信息
    ResultResponse getIpInfo(IpInfoRequest request) throws ApiException;

    // 获取天气信息
    ResultResponse getWeatherInfo(HsuApiClient hsuApiClient, WeatherRequest request) throws ApiException;

    // 获取天气信息，无需客户端信息
    ResultResponse getWeatherInfo(WeatherRequest request) throws ApiException;
}
